package com.yaj.controller;


import com.yaj.base.ResponseResult;
import com.yaj.service.IApprovalRecordsService;
import com.yaj.vo.RecordsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaojiu
 * @since 2024-08-21
 */
@RestController
@RequestMapping("/leave")
public class ApprovalRecordsController {
    @Autowired
    private IApprovalRecordsService approvalRecordsService;

    @GetMapping("/approval-records/{id}/{recordId}")
    public ResponseResult<RecordsVo> approvalRecords(@PathVariable("id") Long id,@PathVariable("recordId") Long recordId){
        RecordsVo recordsVo = approvalRecordsService.approvalRecords(id,recordId);
        return ResponseResult.success(recordsVo);
    }
}
